﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Logon.aspx.cs" Inherits="AnalyseCRM.Logon" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>证券智能营销分析系统登录界面</title>
    <link href="Styles/login.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="Scripts/jquery-ui-1.9.1.custom/js/jquery-1.8.2.js"></script>
    <script type="text/javascript" language="javascript">
        $(document).ready(function () {
            $("#jucesubmit").click(function () {
                var username = $("#juceusername").val();
                var password = $("#juecepassword").val();
                var pValue = username + "|" + password;
                jQuery.ajax({
                    type: "post",
                    url: "InteractiveData/LogOnAjax.aspx",
                    data: "paramvalue=" + escape(pValue),
                    success: function (message) {
                        if (message == "SUCCESS") {
                            document.location = "MainPage.aspx";
                        }
                        else {
                            alert("登录验证失败，请检查用户名称和密码！");
                        }
                    },
                    error: function () {
                        alert("登录验证失败，请检查网络是否连接或与系统管理联系！");
                    }
                });
            }); // end of jucesubmit click

            $("#systemsubmit").click(function () {
                var username = $("#sysusername").val();
                var password = $("#syspassword").val();
                var pValue = username + "|" + password;
                jQuery.ajax({
                    type: "post",
                    url: "InteractiveData/LogOnAjax.aspx",
                    data: "paramvalue=" + escape(pValue),
                    success: function (message) {
                        if (message == "SUCCESS") {
                            document.location = "SystemSet/UserManagement.aspx";
                            //alert("系统管理功能建设中......！");
                        }
                        else {
                            alert("登录验证失败，请检查用户名称和密码！");
                        }
                    },
                    error: function () {
                        alert("登录验证失败，请检查网络是否连接或与系统管理联系！");
                    }
                });
            }); // end of systemsubmit click
        });
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div class="align-center">
        <div class="loginlogo">
            <div class="loginlogoleft">
                <img src="images/loginlogo.png" width="56" height="55" alt="" /></div>证券智能营销分析系统</div>
        <div id="con0">
            <ul id="tags">
                <li class="selectTag"><a onclick="selectTag('tagContent0',this)" href="javascript:void(0)">
                    决策人员登陆</a> </li>
                <li><a onclick="selectTag('tagContent1',this)" href="javascript:void(0)">系统管理登陆</a>
                </li>
            </ul>
            <div id="tagContent">
                <div class="tagContent selectTag" id="tagContent0">
                    <div class="SignIncenter">
                        <ul>
                            <li>用户名:</li>
                            <li>
                                <input id="juceusername" class="SignIncenterinput" type="text" value="zhangsan" />
                            </li>
                            <li>密码:</li>
                            <li>
                                <input id="juecepassword" class="SignIncenterinput" type="password" value="123456" />
                                <p>
                                    <a class="password">修改密码</a></p>
                            </li>                                
                            <li><a class="btn">
                                <label>
                                    <input id="jucesubmit" class="submit" type="button" name="Submit" value="登 录" />    
                                </label></a></li>
                        </ul>
                    </div>
                </div>
                <div class="tagContent" id="tagContent1">
                    <div class="SignIncenter">
                        <ul>
                            <li>用户名:</li>
                            <li>
                                <input id="sysusername" class="SignIncenterinput" type="text" value="admin" /></li>
                            <li>密码:</li>
                            <li>
                                <input id="syspassword" class="SignIncenterinput" type="password" value="123456" /></li>
                            <li><a class="password">修改密码?</a></li>
                            <li><a class="btn">
                                <label>
                                    <input id="systemsubmit" class="submit" 
                                           type="button" name="Submit" value="登 录"/></label></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <div style="clear: both">
            </div>
            <div class="loginfoot">
                <a href="http://www.smart-dec.com/" target="_blank">深圳华策略科技有限公司</a> 版权所有 粤ICP备57898377号</div>
        </div>
        <p>
            <script type="text/javascript">
                function selectTag(showContent, selfObj) {
                    // 操作标签
                    var tag = document.getElementById("tags").getElementsByTagName("li");
                    var taglength = tag.length;
                    for (i = 0; i < taglength; i++) {
                        tag[i].className = "";
                    }
                    selfObj.parentNode.className = "selectTag";
                    // 操作内容
                    for (i = 0; j = document.getElementById("tagContent" + i); i++) {
                        j.style.display = "none";
                    }
                    document.getElementById(showContent).style.display = "block";


                }
            </script>
    </div>
    </form>
</body>
</html>
